// index.js
document.addEventListener('DOMContentLoaded', function() {
    const homeBtn = document.getElementById('homeBtn');
    const aboutBtn = document.getElementById('aboutBtn');
    const contactBtn = document.getElementById('contactBtn');
    const content = document.getElementById('content');
    
    function updateContent(title, text) {
        content.innerHTML = `
            <article>
                <h2>${title}</h2>
                <p>${text}</p>
            </article>
        `;
    }
    
    homeBtn.addEventListener('click', function() {
        updateContent('最新文章', '这里是文章内容摘要...');
    });
    
    aboutBtn.addEventListener('click', function() {
        updateContent('关于我', '我是一个热爱写作和分享的人...');
    });
    
    contactBtn.addEventListener('click', function() {
        updateContent('联系我', '邮箱: example@email.com<br>电话: 123-456-7890');
    });
});